package com.itlong.cloud.POJO.PO;

import com.itlong.cloud.annotation.ItlField;
import com.itlong.cloud.annotation.ItlTables;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * <desc>
 * 反馈用户信息表。
 * <desc/>
 *
 * @createDate 2017/9/25.
 */
@ItlTables("feedback_info")
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class FeedbackInfoPO extends BasePO implements Serializable {

    @ItlField(value = "feedback_id", logicKey = "key")
    private String feedbackId; //逻辑id
    @ItlField("user_id")
    private String userId; //用户ID

    @ItlField("feedback_info")
    private String feedbackInfo; //反馈信息

    @ItlField("project_id")
    private String projectId;  //项目编号

    @ItlField("reply_content")
    private String replyContent; //回复内容

    @ItlField("problem_type")
    private Integer problemType; // 问题反馈类型：1app问题反馈 2硬件问题反馈

    @ItlField("app_version")
    private String appVersion; //app版本号

    @ItlField("android_version")
    private String androidVersion; //手机android版本号

    @ItlField("phone_model")
    private String phoneModel; //手机型号

    @ItlField("contact_information")
    private String contactInformation; //联系方式（手机，QQ，邮箱）

    @ItlField("image_url")
    private String imageUrl;    //图片地址

    @ItlField("operate_system")
    private String operateSystem; //操作系统

    @ItlField("net_type")
    private String netType;    //网络类型

    @ItlField("client_show_result")
    private Integer clientShowResult;   //客户端显示结果 1是0 否

    /**
     * <desc>
     *     APP端_我的,新增意见反馈
     * </desc>
     * @param userId
     * @param projectId
     * @param feedbackInfo
     * @param status
     * @param createTime
     */
    public FeedbackInfoPO(String userId,String projectId,String feedbackInfo,Integer status,Date createTime){
        this.userId = userId;
        this.projectId = projectId;
        this.feedbackInfo = feedbackInfo;
        super.setStatus(status);
        super.setCreateTime(createTime);
    }

    /**
     * <desc>
     *      获取问题反馈字符串
     * </desc>
     *
     * @param
     * @return
     * @Author Zhu.yj
     * @createDate  2020/11/13
     */
    public String getProblemTypeString(){
        if (this.problemType == null){
            return "";
        }
        switch (problemType){
            case 1:
                return "App问题反馈";
            case 2:
                return "硬件问题反馈";
                default:
                    return "";
        }
    }



}
